package com.itheima.health.dao;

import com.itheima.health.pojo.OrderSetting;

import java.util.Date;
import java.util.List;

/**
 * 预约设置持久层
 */
public interface OrderSettingDao {
    /**
     * 判断当前日期是否已经设置预约数据
     * @param orderSetting
     * @return
     */
    int count(OrderSetting orderSetting);

    /**
     * 预约数据更新
     * @param orderSetting
     */
    void updateOrder(OrderSetting orderSetting);

    /**
     * 添加预约设置
     * @param orderSetting
     */
    void setOrder(OrderSetting orderSetting);

    /**
     * 查询预约设置
     */
    List<OrderSetting> findAll();

    /**
     * 按月查询预约设置
     * @param date
     * @return
     */
    List<OrderSetting> getOrderSetting(String date);

    /**
     * 查询当日的预约设置
     * @param orderDate
     * @return
     */
    OrderSetting queryOrderSetting(String orderDate);

    /**
     * 更新预约设置表 预约人数+1
     * @param newOrderDate
     */
    void editReservationsByOrderDate(Date newOrderDate);
}
